Rules for integrands of the form((Sin[a+b x+c (x^2)])^n)

1.  ∫Sin[a+b x+c (x^2)]dx

1:  ∫Sin[a+b x+c (x^2)]dx  when  (b^2)-4 a c==0

Derivation: Algebraic simplification

Basis: If  (b^2)-4 a c==0, then a+b x+c (x^2)==((((b+2 c x))^2)/(4 c))

Rule: If  (b^2)-4 a c==0, then

∫Sin[a+b x+c (x^2)]dx  ⟶  ∫Sin[((((b+2 c x))^2)/(4 c))]dx

Program code:

Int[Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  Int[Sin[(b+2*c*x)^2/(4*c)],x] /;
FreeQ[{a,b,c},x] && EqQ[b^2-4*a*c,0]

Int[Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  Int[Cos[(b+2*c*x)^2/(4*c)],x] /;
FreeQ[{a,b,c},x] && EqQ[b^2-4*a*c,0]

2:  ∫Sin[a+b x+c (x^2)]dx  when  (b^2)-4 a c≠0

Derivation: Algebraic expansion

Basis: a+b x+c (x^2)==((((b+2 c x))^2)/(4 c))-(((b^2)-4 a c)/(4 c))

Basis: Sin[z-w]==Cos[w] Sin[z]-Sin[w] Cos[z]

Rule: If  (b^2)-4 a c≠0, then

∫Sin[a+b x+c (x^2)]dx  ⟶  Cos[(((b^2)-4 a c)/(4 c))] ∫Sin[((((b+2 c x))^2)/(4 c))]dx-Sin[(((b^2)-4 a c)/(4 c))] ∫Cos[((((b+2 c x))^2)/(4 c))]dx

Program code:

Int[Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  Cos[(b^2-4*a*c)/(4*c)]*Int[Sin[(b+2*c*x)^2/(4*c)],x] - 
  Sin[(b^2-4*a*c)/(4*c)]*Int[Cos[(b+2*c*x)^2/(4*c)],x] /;
FreeQ[{a,b,c},x] && NeQ[b^2-4*a*c,0]

Int[Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  Cos[(b^2-4*a*c)/(4*c)]*Int[Cos[(b+2*c*x)^2/(4*c)],x] + 
  Sin[(b^2-4*a*c)/(4*c)]*Int[Sin[(b+2*c*x)^2/(4*c)],x] /;
FreeQ[{a,b,c},x] && NeQ[b^2-4*a*c,0]

2:  ∫((Sin[a+b x+c (x^2)])^n)dx  when  n∈ℤ ∧ n>1

Derivation: Algebraic expansion

Rule: If  n∈ℤ ∧ n>1, then

∫((Sin[a+b x+c (x^2)])^n)dx  ⟶  ∫TrigReduce[((Sin[a+b x+c (x^2)])^n)]dx

Program code:

Int[Sin[a_.+b_.*x_+c_.*x_^2]^n_,x_Symbol] :=
  Int[ExpandTrigReduce[Sin[a+b*x+c*x^2]^n,x],x] /;
FreeQ[{a,b,c},x] && IGtQ[n,1]

Int[Cos[a_.+b_.*x_+c_.*x_^2]^n_,x_Symbol] :=
  Int[ExpandTrigReduce[Cos[a+b*x+c*x^2]^n,x],x] /;
FreeQ[{a,b,c},x] && IGtQ[n,1]

X:  ∫((Sin[a+b x+c (x^2)])^n)dx

Rule:

∫((Sin[a+b x+c (x^2)])^n)dx  ⟶  ∫((Sin[a+b x+c (x^2)])^n)dx

Program code:

Int[Sin[a_.+b_.*x_+c_.*x_^2]^n_.,x_Symbol] :=
  Unintegrable[Sin[a+b*x+c*x^2]^n,x] /;
FreeQ[{a,b,c,n},x]

Int[Cos[a_.+b_.*x_+c_.*x_^2]^n_.,x_Symbol] :=
  Unintegrable[Cos[a+b*x+c*x^2]^n,x] /;
FreeQ[{a,b,c,n},x]

N:  ∫((Sin[v])^n)dx  when  n∈(SuperPlus[ℤ])∧ v==a+b x+c (x^2)

Derivation: Algebraic normalization

Rule: If  n∈(SuperPlus[ℤ])∧ v==a+b x+c (x^2), then

∫((Sin[v])^n)dx  ⟶  ∫((Sin[a+b x+c (x^2)])^n)dx

Program code:

Int[Sin[v_]^n_.,x_Symbol] :=
  Int[Sin[ExpandToSum[v,x]]^n,x] /;
IGtQ[n,0] && QuadraticQ[v,x] && Not[QuadraticMatchQ[v,x]]

Int[Cos[v_]^n_.,x_Symbol] :=
  Int[Cos[ExpandToSum[v,x]]^n,x] /;
IGtQ[n,0] && QuadraticQ[v,x] && Not[QuadraticMatchQ[v,x]]

Rules for integrands of the form(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)

1.  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx

1.  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  when  2 c d-b e==0

1:  ∫(d+e x)Sin[a+b x+c (x^2)]dx  when  2 c d-b e==0

Derivation: Inverted integration by parts with m->1

Rule: If  2 c d-b e==0, then

∫(d+e x)Sin[a+b x+c (x^2)]dx  ⟶  -((e Cos[a+b x+c (x^2)])/(2 c))

Program code:

Int[(d_+e_.*x_)*Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  -e*Cos[a+b*x+c*x^2]/(2*c) /;
FreeQ[{a,b,c,d,e},x] && EqQ[2*c*d-b*e,0]

Int[(d_+e_.*x_)*Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  e*Sin[a+b*x+c*x^2]/(2*c) /;
FreeQ[{a,b,c,d,e},x] && EqQ[2*c*d-b*e,0]

2:  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  when  2 c d-b e==0 ∧ m>1

Derivation: Inverted integration by parts

Rule: If  2 c d-b e==0 ∧ m>1, then

∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  ⟶  -((e (((d+e x))^(m-1)) Cos[a+b x+c (x^2)])/(2 c))+(((e^2) (m-1))/(2 c))∫(((d+e x))^(m-2)) Cos[a+b x+c (x^2)]dx

Program code:

Int[(d_.+e_.*x_)^m_*Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  -e*(d+e*x)^(m-1)*Cos[a+b*x+c*x^2]/(2*c) + 
  e^2*(m-1)/(2*c)*Int[(d+e*x)^(m-2)*Cos[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && EqQ[2*c*d-b*e,0] && GtQ[m,1]

Int[(d_.+e_.*x_)^m_*Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  e*(d+e*x)^(m-1)*Sin[a+b*x+c*x^2]/(2*c) - 
  e^2*(m-1)/(2*c)*Int[(d+e*x)^(m-2)*Sin[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && EqQ[2*c*d-b*e,0] && GtQ[m,1]

3:  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  when  2 c d-b e==0 ∧ m<-1

Derivation: Integration by parts

Basis: (((d+e x))^m)==(∂_x)((((d+e x))^(m+1))/(e (m+1)))

Basis: If  2 c d-b e==0, then (∂_x)Sin[a+b x+c (x^2)]==((2 c)/e) (d+e x) Cos[a+b x+c (x^2)]

Rule: If  2 c d-b e==0 ∧ m<-1, then

∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  ⟶  (((((d+e x))^(m+1)) Sin[a+b x+c (x^2)])/(e (m+1)))-((2 c)/((e^2) (m+1)))∫(((d+e x))^(m+2)) Cos[a+b x+c (x^2)]dx

Program code:

Int[(d_.+e_.*x_)^m_*Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  (d+e*x)^(m+1)*Sin[a+b*x+c*x^2]/(e*(m+1)) -
  2*c/(e^2*(m+1))*Int[(d+e*x)^(m+2)*Cos[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && EqQ[2*c*d-b*e,0] && LtQ[m,-1]

Int[(d_.+e_.*x_)^m_*Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  (d+e*x)^(m+1)*Cos[a+b*x+c*x^2]/(e*(m+1)) + 
  2*c/(e^2*(m+1))*Int[(d+e*x)^(m+2)*Sin[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && EqQ[2*c*d-b*e,0] && LtQ[m,-1]

2.  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  when  2 c d-b e≠0

1:  ∫(d+e x)Sin[a+b x+c (x^2)]dx  when  2 c d-b e≠0

Rule: If  2 c d-b e≠0, then

∫(d+e x)Sin[a+b x+c (x^2)]dx  ⟶  -((e Cos[a+b x+c (x^2)])/(2 c))+((2 c d-b e)/(2 c))∫Sin[a+b x+c (x^2)]dx

Program code:

Int[(d_.+e_.*x_)*Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  -e*Cos[a+b*x+c*x^2]/(2*c) + 
  (2*c*d-b*e)/(2*c)*Int[Sin[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[2*c*d-b*e,0]

Int[(d_.+e_.*x_)*Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  e*Sin[a+b*x+c*x^2]/(2*c) + 
  (2*c*d-b*e)/(2*c)*Int[Cos[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[2*c*d-b*e,0]

2:  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  when  b e-2c d≠0 ∧ m>1

Rule: If  b e-2c d≠0 ∧ m>1, then

∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  ⟶  
-((e (((d+e x))^(m-1)) Cos[a+b x+c (x^2)])/(2 c))-((b e-2 c d)/(2 c))∫(((d+e x))^(m-1)) Sin[a+b x+c (x^2)]dx+(((e^2) (m-1))/(2 c))∫(((d+e x))^(m-2)) Cos[a+b x+c (x^2)]dx

Program code:

Int[(d_.+e_.*x_)^m_*Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  -e*(d+e*x)^(m-1)*Cos[a+b*x+c*x^2]/(2*c) - 
  (b*e-2*c*d)/(2*c)*Int[(d+e*x)^(m-1)*Sin[a+b*x+c*x^2],x] + 
  e^2*(m-1)/(2*c)*Int[(d+e*x)^(m-2)*Cos[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[b*e-2*c*d,0] && GtQ[m,1]

Int[(d_.+e_.*x_)^m_*Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  e*(d+e*x)^(m-1)*Sin[a+b*x+c*x^2]/(2*c) - 
  (b*e-2*c*d)/(2*c)*Int[(d+e*x)^(m-1)*Cos[a+b*x+c*x^2],x] - 
  e^2*(m-1)/(2*c)*Int[(d+e*x)^(m-2)*Sin[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[b*e-2*c*d,0] && GtQ[m,1]

3:  ∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  when  b e-2c d≠0 ∧ m<-1

Rule: If  b e-2c d≠0 ∧ m<-1, then

∫(((d+e x))^m)Sin[a+b x+c (x^2)]dx  ⟶  
(((((d+e x))^(m+1)) Sin[a+b x+c (x^2)])/(e (m+1)))-((b e-2 c d)/((e^2) (m+1)))∫(((d+e x))^(m+1)) Cos[a+b x+c (x^2)]dx-((2 c)/((e^2) (m+1)))∫(((d+e x))^(m+2)) Cos[a+b x+c (x^2)]dx

Program code:

Int[(d_.+e_.*x_)^m_*Sin[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  (d+e*x)^(m+1)*Sin[a+b*x+c*x^2]/(e*(m+1)) -
  (b*e-2*c*d)/(e^2*(m+1))*Int[(d+e*x)^(m+1)*Cos[a+b*x+c*x^2],x] -
  2*c/(e^2*(m+1))*Int[(d+e*x)^(m+2)*Cos[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[b*e-2*c*d,0] && LtQ[m,-1]

Int[(d_.+e_.*x_)^m_*Cos[a_.+b_.*x_+c_.*x_^2],x_Symbol] :=
  (d+e*x)^(m+1)*Cos[a+b*x+c*x^2]/(e*(m+1)) + 
  (b*e-2*c*d)/(e^2*(m+1))*Int[(d+e*x)^(m+1)*Sin[a+b*x+c*x^2],x] +
  2*c/(e^2*(m+1))*Int[(d+e*x)^(m+2)*Sin[a+b*x+c*x^2],x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[b*e-2*c*d,0] && LtQ[m,-1]

2:  ∫(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)dx  when  n-1∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  n-1∈(SuperPlus[ℤ]), then

∫(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)dx  ⟶  ∫(((d+e x))^m)TrigReduce[((Sin[a+b x+c (x^2)])^n)]dx

Program code:

Int[(d_.+e_.*x_)^m_.*Sin[a_.+b_.*x_+c_.*x_^2]^n_,x_Symbol] :=
  Int[ExpandTrigReduce[(d+e*x)^m,Sin[a+b*x+c*x^2]^n,x],x] /;
FreeQ[{a,b,c,d,e,m},x] && IGtQ[n,1]

Int[(d_.+e_.*x_)^m_.*Cos[a_.+b_.*x_+c_.*x_^2]^n_,x_Symbol] :=
  Int[ExpandTrigReduce[(d+e*x)^m,Cos[a+b*x+c*x^2]^n,x],x] /;
FreeQ[{a,b,c,d,e,m},x] && IGtQ[n,1]

X:  ∫(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)dx

Rule:

∫(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)dx  ⟶  ∫(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)dx

Program code:

Int[(d_.+e_.*x_)^m_.*Sin[a_.+b_.*x_+c_.*x_^2]^n_.,x_Symbol] :=
  Unintegrable[(d+e*x)^m*Sin[a+b*x+c*x^2]^n,x] /;
FreeQ[{a,b,c,d,e,m,n},x]

Int[(d_.+e_.*x_)^m_.*Cos[a_.+b_.*x_+c_.*x_^2]^n_.,x_Symbol] :=
  Unintegrable[(d+e*x)^m*Cos[a+b*x+c*x^2]^n,x] /;
FreeQ[{a,b,c,d,e,m,n},x]

N:  ∫(u^m)((Sin[v])^n)dx  when  n∈(SuperPlus[ℤ])∧ u==d+e x ∧ v==a+b x+c (x^2)

Derivation: Algebraic normalization

Rule: If  n∈(SuperPlus[ℤ])∧ u==d+e x ∧ v==a+b x+c (x^2), then

∫(u^m)((Sin[v])^n)dx  ⟶  ∫(((d+e x))^m)((Sin[a+b x+c (x^2)])^n)dx

Program code:

Int[u_^m_.*Sin[v_]^n_.,x_Symbol] :=
  Int[ExpandToSum[u,x]^m*Sin[ExpandToSum[v,x]]^n,x] /;
FreeQ[m,x] && IGtQ[n,0] && LinearQ[u,x] && QuadraticQ[v,x] && Not[LinearMatchQ[u,x] && QuadraticMatchQ[v,x]]

Int[u_^m_.*Cos[v_]^n_.,x_Symbol] :=
  Int[ExpandToSum[u,x]^m*Cos[ExpandToSum[v,x]]^n,x] /;
FreeQ[m,x] && IGtQ[n,0] && LinearQ[u,x] && QuadraticQ[v,x] && Not[LinearMatchQ[u,x] && QuadraticMatchQ[v,x]]